package partikelTest1;

import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.Timer;

public class partikelTest1 extends JFrame implements ActionListener{

	ParticleViewer pW = new ParticleViewer();
	
	Timer drawTimer = new Timer(1000/30, this);
	
	public partikelTest1(){
		
	//	setLayout(new GridLayout(1,1));
		
		add(pW);
		
		drawTimer.start();
		
		setSize(400,400);
		setVisible(true);
		setDefaultCloseOperation(EXIT_ON_CLOSE);
		
	}
	
	public static void main(String[] arg){
		
		partikelTest1 dPT = new partikelTest1();
		
	}

	@Override
	public void actionPerformed(ActionEvent arg0) {

		if(arg0.getSource() == drawTimer){
			
			pW.repaint();
			
		}
		
	} 
	
}
